<!DOCTYPE html>
<html>
<head>
	<title>赔率设置-生肖半波头尾数</title>
	<meta charset="utf-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/css/font-awesome.css" rel="stylesheet">
    <link href="__STATIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__STATIC__/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="__STATIC__/xinli/css/history.css">
	<style type="text/css">
	.memu>span>a{
			color: yellow;
		}
	.middle-line1-content{
	        	width: 99%;
		background-color: rgba(182, 171, 171, 0.56);
		font-size: 12px;
		border: 1px solid rgba(128, 128, 128, 0.72);
		border-radius: 5px;
		margin: 0 auto;
		}
	.middle-line1-content>div{
		margin-top: 3px;
		padding: 3px 0;
		}

	.plate{
		float: left;
		width: 10%;
		color: black;
		text-align: center;
	}
	
	.hangkong{
		float: left;
		width: 80%;
	}

	.hangkong>span>a{
		padding: 0 2px;
		color: red;
	}

	.issue{
		float: left;
		width: 10%;
		color: black;
	}

	.open{
		width: 100%;
    		padding: 5px 10px;
	}

	.open-one{
		width: 34.8%;
		float: left;
		height: 350px;
	}

	.open-name>th{
		background: rgb(224,139,46);
		color: white;
		padding: 2px;
		text-align: center;
		border: 2px solid silver;
		font-size: 12px;
	}

	.open-thing>td{
		background: rgb(240,240,240);
		color: black;
		text-align: center;
		border: 2px solid silver;
		font-size: 13px;
	}

	.open-thing>td:last-child{
		font-size: 12px;
		color: black;
	}


	.open-thing>td>input{
		    width: 45px;
		    font-size: 12px;
		    border-radius: 3px;
		    border: 1px solid gray;
		    text-align: center;
	}

	.redorblue{
		text-align: center;
    		padding: 10px 0;
    		border: 1px solid gray;
	}

	.sendout>button{
		font-size: 12px;
    		border: 1px solid gray;
    		border-radius: 3px;
    		color: black;
	}

	.sendup{
		margin-left: 30px;
	}

	.sendup>button{
		border: 1px solid gray;
    		border-radius: 3px;
    		color: black;
	}

	.open-other{
		padding: 0 10px;
	}

	.open-other>table>tbody>tr>td{
		text-align: center;
		background: rgb(240,240,240);
		color: red;
		font-weight: bold;
	}

	.open-button{
		padding: 10px 0;
    		border: 1px solid gray;
    		text-align: center;
	}

	.open-button>span:first-child{
		border: 1px solid gray;
    		border-radius: 3px;
    		color: black;
    		font-size: 13px;
    		margin-right: 10px;
    		padding: 6px;
	}

	.open-button>span:last-child{
		border: 1px solid rgb(33, 150, 243);
    		border-radius: 3px;
    		color: black;
    		font-size: 12px;
	}

	.open-two{
		width: 30%;
		float: left;
		height: 431px;
		margin-left: 0.2%;
	}
	#zidong{
	    border: 1px solid rgba(0, 0, 0, 0.35);
	    padding: 2px;
	    border-radius: 4px;
	        background-color: white;
	}

	</style>
</head>
<body>
	<div>
		<div class="heads">
			<div class="poly">保利</div>
			<div style="clear: both;"></div>

		<div style="position: relative;width: 80%;float: right;">
			<div class="arrow-left"></div>
			<div class="memus" style="height: 30px;">
				<div class="bevel"></div>
				<div style="clear: both;"></div>
		{switch name=":session('usertype')"}
    {case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/director')}">总监</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="2"}
    		{switch name=":session('roots')"}
    		 {case value="0"}
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
				{case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
			{default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
			{/switch}
    {/case}
    {case value="3"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="4"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="5"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="6"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
	{/switch}
			</div>
			<div style="clear: both;"></div>
		

		<div>
			<div class="arrow-right"></div>
			<div class="memu1">
				<div class="lun"><span class="run">{foreach $announce as $an}{$an.content}{/foreach}</span>
				</div>
			</div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>
		</div>

		<div class="middle">
			<div class="middle-line1-content">
				<div class="plate">赔率设置</div>
				<div class="hangkong">
					<select>
						<option>赔率调节</option>
						<option>默认赔率</option>
					</select>
					<span><a href="{:url('admin/home/oddstema')}">特码</a></span>
					<span><a href="{:url('admin/home/oddszhengma')}">正码</a></span>
					<span><a href="{:url('admin/home/oddszmte')}">正码特</a></span>
					<span><a href="{:url('admin/home/oddspass')}">正码1-6/过关</a></span>
					<span><a href="{:url('admin/home/oddsselert')}">正码多选项</a></span>
					<span><a href="{:url('admin/home/oddswave')}">生肖半波头尾数</a></span>
					<span><a href="{:url('admin/home/oddsseven')}">正总一肖正特尾数七色波</a></span>
					<span><a href="{:url('admin/home/oddsmiss')}">不中/多中/连码</a></span>
					<span><a href="{:url('admin/home/oddsmantissa')}">尾数连七码</a></span>
					<!-- <span><a href="{:url('admin/home/oddssurrender')}">自动降赔率</a></span> -->
					<span><a href="{:url('admin/home/oddspoor')}">赔率盘差</a></span>
				</div>
				<div class="issue">
					恢复默认赔率
				</div>
				<div style="clear: both;"></div>
			</div>
			


			<div class="middle-form-content">
				<form action="" method="post"  class="form-size">
					<div class="open">
						<div class="open-one" style="width: 100%;">
							<table style="width: 100%;height: 100%">
								<tbody>
									<tr class="open-name">
										<th>类型</th>
										<th>限制下调金额</th>
										<th>每次下调赔率的单位</th>
										<th>最低赔率</th>
										<th>方式</th>
									</tr>
									{foreach $res as $r}
									<tr class="open-thing">
										<td><b id="1">{$r.name}</b></td>
										<td id="topprice"><input type="text" name="topprice" data-id={$r.id} style="width: 80px;text-align: left;" value="{$r.topprice}"></td>
										<td id="moneys"><input type="text" name="moneys" data-id={$r.id} style="width: 60px;text-align: left;padding-left: 5px;" value="{$r.moneys}"></td>
										<td id="downrate"><input type="text" name="downrate" data-id={$r.id} style="width: 80px;text-align: left;" value="{$r.downrate}"></td>
										<td><span id="zidong">自动</span></td>
									</tr>
									{/foreach}
									
								</tbody>
							</table>
							<div class="open-button">
								<span onclick="xiugai();">修改</span>
							</div>
						</div>
					
                			</form>
			</div>
		</div>
	</div>
	<!-- 全局js -->
    <script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
	<!-- 自定义JS -->
	<script src="__STATIC__/js/admin/controtiren.js"></script>
    <script type="text/javascript">
    	//公告轮播.html
    		$(function(){

			var price = 0
			//轮播
			var left = 0;
			function move(){
				left--
				if (left < -$(".run").width()) {
					left = 0
				}
				$(".run").css("left",left+"px")
			}
			setInterval(move,60)
		})
    		$(document).on('click','#zidong',function(res){
    			var topprice = $(this).parent().parent().find('#topprice').find('input[name=topprice]').val();
    			var moneys = $(this).parent().parent().find('#moneys').find('input[name=moneys]').val();
    			var downrate = $(this).parent().parent().find('#downrate').find('input[name=downrate]').val();
    			var id = $(this).parent().parent().find('#downrate').find('input[name=downrate]').attr('data-id');
    			console.log(topprice,moneys,downrate,id);
    			$.post('{:url("admin/Interfaces/setonejiangrate")}',{id:id,topprice:topprice,moneys:moneys,downrate:downrate},function(res){
	        	 	console.log(res)
	        	 	if(res==1){
	        	 		localStorage.clear();
	        	 		alert('设置自动赔率成功');
	        	 		document.location.reload();
	        	 	}else{
	        	 		alert('设置自动赔率失败');
	        	 		document.location.reload();
	        	 	}
	        	 })
    		})
    		item1=[];item2=[];item3=[];
    		var storage=window.localStorage;
    		function xiugai(){
    			$("input[name=topprice]").each(function(index,item){
	    			var x = $(this).attr('data-id');
	    			var n = item.value;
	    			if(item.value!=0){
					         var data = {
					         	id:x,
					         	topprice:n
					         }
					         item1.push(data);
					         item1 = JSON.stringify(item1);
					         storage.setItem("item1",item1);
					         item1 = JSON.parse(storage.getItem("item1"));
					}
	    		})
	    			$("input[name=moneys]").each(function(index,item){
	    			var x = $(this).attr('data-id');
	    			var n = item.value;
	    			if(item.value!=0){
					         var data = {
					         	id:x,
					         	moneys:n
					         }
					         item2.push(data);
					         item2 = JSON.stringify(item2);
					         storage.setItem("item2",item2);
					         item2 = JSON.parse(storage.getItem("item2"));
					}
	    		})
	    			$("input[name=downrate]").each(function(index,item){
	    			var x = $(this).attr('data-id');
	    			var n = item.value;
	    			if(item.value!=0){
					         var data = {
					         	id:x,
					         	downrate:n
					         }
					         item3.push(data);
					         item3 = JSON.stringify(item3);
					         storage.setItem("item3",item3);
					         item3 = JSON.parse(storage.getItem("item3"));
					}
	    		})
	    		 var dat1 = storage.getItem("item1");
	    		 var dat2 = storage.getItem("item2");
	    		 var dat3 = storage.getItem("item3");
	    		 // console.log(dat1,dat2,dat3);
	    		 setbuzhong(dat1,dat2,dat3);
    		}
	    	function setbuzhong(dat1,dat2,dat3){
    			if(dat1==""||dat2==""||dat3=="")return 0 ;
    			$.post('{:url("admin/Interfaces/setjiangrate")}',{dat1:dat1,dat2:dat2,dat3:dat3},function(res){
	        	 	console.log(res)
	        	 	if(res==1){
	        	 		localStorage.clear();
	        	 		alert('设置自动赔率成功');
	        	 		document.location.reload();
	        	 	}else{
	        	 		alert('设置自动赔率失败');
	        	 		document.location.reload();
	        	 	}
	        	 })
    		}
    		// [{
    		//     			"id":1,"topprice":n,"moneys":n,"downrate":n
    		//     		}
    		//     		,
    		//     		{
    		//     			"id":2,"topprice":n,"moneys":n,"downrate":n
    		// }]
    </script>


</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>